<?php

/*
 * This class is used for as Model for Product table 
 */

class Model_Propertykml extends Model_Base {

    protected $_name = 'property_kml';
    protected $_primaryKey = 'prpk_id';

    /**
     *  This function is used to get Questions
     * @return null|Zend_Db_Table_Row_Abstract
     */
    public function fetchPropertyKml($where = "", $limit = "", $offset = "0", $order = 'prpk_id', $sort = 'ASC') {
        $select = $this->select()
                ->from(array('prtyp' => 'property_kml'));
        if ($where != '') {
            $select->where($where);
        }
        if ($limit != "") {
            $select->limit($limit, $offset);
        }
        $select->order($order . " " . $sort);
        $data = parent::fetchAll($select);
        if (!empty($data)) {
            return $data->toArray();
        } else {
            return array();
        }
    }

}
